Repository navigation
test: raise line coverage - #304
Merged
Merged
Conversation
…mpiler's rejected fragments Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…iven to query constructors Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
… expression Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…a name Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…d a driver outside the Driver hierarchy Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…arset changes and a dropped link Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…sting columns, abandoned cursors and the $user schema Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…columns Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…ect and dropping an enum column Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #304 +/- ##
==========================================
+ Coverage 92.51% 94.56% +2.04%
==========================================
Files 143 143
Lines 5263 5260 -3
==========================================
+ Hits 4869 4974 +105
+ Misses 394 286 -108
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Why?
Coverage goes up before the mutation work resumes.
Review notes
testo/codecov0.2.5,ExecutableLines) guesses its executable lines from tokens. The guess counts lines PHP never puts an opcode on: string literals concatenated into a constant, the format line of asprintf()(PHP 8.4+ compiles it to a rope), theif (opener of a multi-line condition, the signature of a promoted constructor, and argument lines that hold only a variable. Codecov merges flags line by line, so a line one suite guesses and the suite that runs the file never reports stays missed. On2.xthat is 213 of the 395 misses, e.g. the SQL strings inSQLServerHandler::fetchBulk*(),SQLServerTable::fetchIndexes()andSQLServerCompiler. A line drops out only when all five suites load the file, which tests cannot do for driver-specific classes. The fix belongs in Testo's estimator. This PR closes the one generic case,UnexpectedOperatorException: the unit suite now loads it.PostgresTable::getSequence()always returnsnull.fetchPrimaryKeys()checks\is_array($this->primarySequence)on a?stringproperty, so lines 255-259 never run.MySQLHandler::alterColumn(),SQLServerHandler::alterColumn()and the dropped-column loop inAbstractTablecompare$column->getName() === $foreign->getColumns(), which is never true. The foreign-key backup and restore around a column change never runs, and a dropped column's foreign keys are never forgotten. Changing the nullability of a referencing column still works on all four servers.where('x', 'between', $a, <subquery or fragment>)throws aTypeError.Compiler::condition()binds the second bound as a parameter without checking its type. TheCompilerCachelines 355-366 only run on the way to this crash.ActiveQuery::withDriver()without a prefix. It stores anullprefix, and a latersqlStatement()fails because the compiler expects a string.createInstance()getsnullconstraint or enum maps, which no caller in the package passes:PostgresColumn701-708, 736-738;SQLServerColumn197-202, 426-431.PostgresHandler122 (the search schemas are never empty),SQLServerHandler259 (empty id lists are filtered out first),SQLServerTable50 (an existing table always has columns),PostgresColumn801-802 (Postgres always prints bit defaults with a::cast, which the branch before this one catches).Compiler,SQLiteCompilerandCompilerCachebranches for insert values that are notParameters, and for an upsert without a conflict target: the builders never produce either.Driver182-184 (clearCache()cannot throw), 420 (the publicidentifier()method answers the call first) and 615-618.Handler265,AbstractColumn745, andSQLiteColumn261 (isEnum()is always false).ColumnAttributesTrait::isAttribute()has no caller.polyfill.phpandfunctions_polyfill.phponly define their functions on PHP below 8.1, and the package requires 8.2.MySQLTable98 (MariaDB only),MySQLColumn254 and 265 (MySQL always reports collations with a charset prefix and lowercase types), andSQLServerDriver254 (SQL Server older than 2012).Checklist